Skip to content

Conversation

@easyhooon
Copy link
Contributor

@easyhooon easyhooon commented Nov 3, 2025

🎯 Goal

I have updated the README because the logging setup code shown in it differs from the actual implementation, which could cause confusion for developers using this plugin.

🛠 Implementation details

https://github.com/skydoves/compose-stability-analyzer?tab=readme-ov-file#configure-custom-logger--enable-logging

AS IS

class MyApp : Application() {
    override fun onCreate() {
        super.onCreate()

        // Enable recomposition tracking ONLY in debug builds
        LoggerProvider.setEnabled(BuildConfig.DEBUG)
    }
}

Important Note

  • If you don't enable LoggerProvider, no logs will appear even with @TraceRecomposition

TO BE

class MyApp : Application() {
    override fun onCreate() {
        super.onCreate()

        // Enable recomposition tracking ONLY in debug builds
        ComposeStabilityAnalyzer.setEnabled(BuildConfig.DEBUG)
    }
}

Important Note

  • If you don't enable ComposeStabilityAnalyzer, no logs will appear even with @TraceRecomposition

✍️ Explain examples

class MyApp : Application() {
    override fun onCreate() {
        super.onCreate()

        // Enable recomposition tracking ONLY in debug builds
        LoggerProvider.setEnabled(BuildConfig.DEBUG)
    }
}

When writing the code as above and building it, the following error occurs.

Unresolved reference 'LoggerProvider'.

refernece

https://github.com/YAPP-Github/Reed-Android/pull/211/files

Question

I'm wondering if LoggerProvider is not an actual class name but rather a descriptive term that encompasses both the default logger and custom loggers.

I could only find the name LoggerProvider in the LoggerProviderTest class and comments within the project.

Thank you for creating such an excellent plugin!

Summary by CodeRabbit

  • Documentation
    • Updated setup instructions for enabling recomposition logging in debug builds to reflect API changes.

Updated logging configuration to use ComposeStabilityAnalyzer instead of LoggerProvider for debug builds.
@easyhooon easyhooon requested a review from skydoves as a code owner November 3, 2025 04:05
@coderabbitai
Copy link

coderabbitai bot commented Nov 3, 2025

Walkthrough

Documentation updated to replace the public API reference from LoggerProvider.setEnabled(BuildConfig.DEBUG) to ComposeStabilityAnalyzer.setEnabled(BuildConfig.DEBUG) for enabling recomposition logging in debug builds, with all related notes and examples aligned accordingly.

Changes

Cohort / File(s) Summary
Documentation API Reference Update
README.md
Replaced LoggerProvider.setEnabled() API calls with ComposeStabilityAnalyzer.setEnabled() throughout examples and notes; updated conditional statement to reference ComposeStabilityAnalyzer instead of LoggerProvider.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Single file modified with straightforward API reference substitutions
  • Documentation-only changes with no code logic alterations
  • Repetitive pattern of replacing one identifier with another

Poem

🐰 A hop through the docs, a change I did see,
LoggerProvider fades, ComposeStabilityAnalyzer's key!
Debug logs now flow from a fresh API name,
Recomposition tracking stays just the same! ✨

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Update README with Configure Custom Logger & Enable Logging" is partially related to the changeset. It accurately refers to the README section being updated and describes its general topic (configuring loggers and enabling logging), but it does not clearly convey the specific primary change, which is correcting the API usage from LoggerProvider.setEnabled() to ComposeStabilityAnalyzer.setEnabled(). The title describes what the section is about rather than what was actually changed within it.
Description Check ✅ Passed The pull request description includes three of the four main required sections from the template: a clear Goal explaining why the README needs updating, Implementation details with before/after code comparisons showing the change from LoggerProvider to ComposeStabilityAnalyzer, and Explain examples demonstrating the build error that occurs with the outdated code. However, the "Preparing a pull request for review" section is missing, which should document whether the author ran the specified ./gradlew spotlessApply and ./gradlew apiDump commands. For a documentation-only change to README, these checks may not strictly apply, and the description adequately communicates the rationale and specific changes needed for reviewers to understand the update.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
README.md (1)

278-278: Fix markdown lint warning: use heading syntax instead of emphasis.

The "Important Note" uses bold emphasis (**...**) instead of proper heading syntax. Convert to a markdown heading for better semantic structure and to resolve the MD036 linting violation.

-**Important Note**
+### Important Note

This also improves document structure and makes the note visually distinct as a section header rather than emphasized text.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e5ea4d8 and 097f3d6.

📒 Files selected for processing (1)
  • README.md (1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
README.md

278-278: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

🔇 Additional comments (1)
README.md (1)

273-273: API reference updated correctly.

The changes replacing LoggerProvider with ComposeStabilityAnalyzer align with the actual public API and address the confusing documentation that referenced a non-existent public class. Both the code example and the accompanying note are now consistent with the implementation.

Also applies to: 281-281

Copy link
Owner

@skydoves skydoves left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

@skydoves skydoves merged commit 00aeb7e into skydoves:main Nov 3, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants